package tk.djcrazy.instantmessage.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class HiernateTranctionInterceptor extends AbstractInterceptor {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6172991710545530926L;
 	@Override
	public String intercept(ActionInvocation arg0) throws Exception {
		String res = null;
//		 transactionOperation.beginTransaction();
		try {
			res = arg0.invoke();
//			 transactionOperation.commitTransaction();
		} catch (Exception e) {
//			 transactionOperation.rollbackTransaction();
			throw e;
		}
		return res;
	}
}
